﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ObjectTransposeApi.Extension
{
    /// <summary/>
    internal static class QueueExtension
    {
        /// <summary/>
        public static void EnqueueRange<T>(this Queue<T> queue, IEnumerable<T> range)
        {
            // if the range is not set then exit
            if (range == null)
            {
                return;
            }

            foreach(T value in range)
            {
                // add each item
                queue.Enqueue(value);
            }
        }
    } 
}
